package com.glasses.business.pay.com;

import android.app.Activity;

import com.glasses.business.entity.PayInfo;


/**
 * @Description: 支付控件
 * @author wang
 * @date 2016-3-10 下午6:12:37
 * @version V1.0
 */
public class PayAgentUtils {

	private String notifyUrl;
	private String notifyIp;

	private PayAgentUtils(){

	}

	private static volatile PayAgentUtils instance;
	
	public static PayAgentUtils getInstance() {

		if (null == instance) {

			synchronized (PayAgentUtils.class) {

				if (null == instance) {
					instance = new PayAgentUtils();
				}
			}
		}

		return instance;
	}


	/**
	 * 支付
	 * @param ac
	 * @param payType 支付内省
	 * @param payListener 支付回调
	 */
	public void pay(Activity ac, PayAgent.PayType payType, PayInfo payInfo, PayListener payListener){
		PayAgent agent =  PayAgent.getInstance();
		agent.pay(ac, payType, payInfo, payListener);
	}
}
